package com.hevs.samplewebapp.client.bean;

/**
 * User for the client
 * <p> It provides to the client side a user same as the server without annotations</p>
 * @author Thomas Rouvinez
 * @Date: 26.03.2012
 * 
 * Goal : provide a generic user object for the whole client
 * part .
 */
public class User {
	// ------------------------------------------------------------
		// VARIABLES
		// ------------------------------------------------------------
		
	/**
	 * Key of the user
	 */
	private String key;
	
	/**
	 * First name of the user
	 */
	private String firstName;
	
	/**
	 * Last name of the user
	 */
	private String lastName;
	
	/**
	 * Login of the user
	 */
	private String login;
	
	/**
	 * Password of the user
	 */
	private String password;
	
	/**
	 * Email of the user
	 */
	private String email;
	
	/**
	 * Credential level of the user
	 */
	private int credentialLevel;
	
	// ------------------------------------------------------------
	// CONSTRUCTORS
	// ------------------------------------------------------------

	/**
	 * Constructor of the User without parameter
	 */
	public User(){};
	
	/**
	 * Constructor of the user without credential level
	 * @param firstName
	 * 	First name of the user
	 * @param lastName
	 * 	Last name of the user
	 * @param email
	 * 	email of the user
	 */
	public User(String firstName, String lastName, String email){
		this.firstName = firstName;
		this.lastName = lastName;
		this.email = email;
	}
	
	/**
	 * Constructor of the user with credential level
	 * @param login
	 * 	Login of the user
	 * @param password
	 * 	Password of the user
	 * @param email
	 * 	Email of the user
	 * @param credentialLevel
	 * 	Credential level of the user
	 */
	public User(String login, String password, String email, int credentialLevel){
		this.login = login;
		this.password = password;
		this.email = email;
		this.credentialLevel = credentialLevel;
	}

	// ------------------------------------------------------------
	// METHODS
	// ------------------------------------------------------------

	/**
	 * Getter of the Key
	 * @return
	 *  String version of the Key
	 */
	public String getKey() {
		return key;
	}

	/**
	 * Setter of the Key
	 * @param key
	 * 	String version of the Key
	 */
	public void setKey(String key) {
		this.key = key;
	}

	/**
	 * Getter of the First name
	 * @return
	 * 	String version of the first name
	 */
	public String getFirstName() {
		return firstName;
	}

	/**
	 * Setter of the First name
	 * @param firstName
	 * String version of the First name
	 */
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	/**
	 * Getter of the Last name
	 * @return
	 * String version of the last name
	 */
	public String getLastName() {
		return lastName;
	}

	/**
	 * Setter of the Last name
	 * @param lastName
	 * String verison of the Last name
	 */
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	/**
	 * Getter of the Login
	 * @return
	 * String version of the Login
	 */
	public String getLogin() {
		return login;
	}

	/**
	 * Setter of the Login
	 * @param login
	 * String version of the Login
	 */
	public void setLogin(String login) {
		this.login = login;
	}

	/**
	 * Getter of the Password
	 * @return
	 * String version of the Password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * Setter of the Password
	 * @param password
	 * String version of the Password
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * Getter of the Email
	 * @return
	 * String version of the Email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * Setter of the email
	 * @param email
	 * String version of the email
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * Getter of the Credential Level
	 * @return
	 * int version of the Credential level
	 */
	public int getCredentialLevel() {
		return credentialLevel;
	}
	
	/**
	 * Setter of the Credential level
	 * @param credentialLevel
	 * Int version of the Credential level
	 */
	public void setCredentialLevel(int credentialLevel) 
	{
		this.credentialLevel=credentialLevel;
	}
}
